From: Remi Salmon Date: Thu, 3 Sep 2020 22:45:38 +0000 (+0000) Subject: status/network: Use the same signal strength values as GNOME Settings X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~199 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9cd211a99afc87f89214c7d52d744450087c0a82;p=gnome-shell.git status/network: Use the same signal strength values as GNOME Settings Be consistent and use the same wifi signal strength thresholds that are used by Settings to ensure that the signal strengths look the same in Settings and gnome-shell. See https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/master/panels/netwo> for the values used in Control Center. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/217 Part-of: --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 6b19fad0e..bb119f690 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -54,15 +54,16 @@ const PortalHelperIface = loadInterfaceXML('org.gnome.Shell.PortalHelper'); const PortalHelperProxy = Gio.DBusProxy.makeProxyWrapper(PortalHelperIface); function signalToIcon(value) { - if (value > 80) - return 'excellent'; - if (value > 55) - return 'good'; - if (value > 30) - return 'ok'; - if (value > 5) + if (value < 20) + return 'none'; + else if (value < 40) return 'weak'; - return 'none'; + else if (value < 50) + return 'ok'; + else if (value < 80) + return 'good'; + else + return 'excellent'; } function ssidToLabel(ssid) {